package cn.ligoo.dtu.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ligoo.dtu.dao.UserDtuDao;
import cn.ligoo.dtu.domain.UserDtu;
import cn.ligoo.dtu.service.UserDtuService;

/**
 * @author Jin,QingHua
 * @version 2012-07-24 12:18:52
 */
@Service
public class UserDtuServiceImpl implements UserDtuService {

	@Resource
	private UserDtuDao userDtuDao;

	@Override
	public Integer createUserDtu(UserDtu t) {
		this.userDtuDao.insertEntity(t);
		return t.getId();
	}

	@Override
	public int modifyUserDtu(UserDtu t) {
		return this.userDtuDao.updateEntity(t);
	}

	@Override
	public int removeUserDtu(UserDtu t) {
		return this.userDtuDao.deleteEntity(t);
	}

	@Override
	public UserDtu getUserDtu(UserDtu t) {
		return this.userDtuDao.selectEntity(t);
	}

	@Override
	public Integer getUserDtuCount(UserDtu t) {
		return this.userDtuDao.selectEntityCount(t);
	}

	@Override
	public List<UserDtu> getUserDtuList(UserDtu t) {
		return this.userDtuDao.selectEntityList(t);
	}

}
